Smart indent provides a simple method to ensure that the format of text indented from the left-hand margin is maintained as new lines are inserted. This is achieved by copying all the tab and space characters preceding the first non-space character on a line to the beginning of each new line.
This feature is especially useful when programming in languages where the level of an indented line visually indicates association with a previous expression. For example, typing a return at the end of the following line:
{tab}{tab}some text
Will insert a new line starting with the tab stops, positioning the insertion point immediately after the two tab characters, for example:
{tab}{tab}
Smart indent will duplicate the order in which tabs and spaces appear.